package com.hs.gs.domain;

import javax.persistence.ManyToOne;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import java.util.Date;

import javax.persistence.Enumerated;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.format.annotation.DateTimeFormat;

@RooJavaBean
@RooToString
@RooEntity(finders = "findPatrolsByPatrolDay")
public class Patrol {

    @ManyToOne
    private Department department;

    @ManyToOne
    private Checking checking;

    @ManyToOne
    private PatrolTime pTime;

    @ManyToOne
    private PatrolPoint point;

    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "S-")
    private Date patrolDay;
    
    @Enumerated
    private PatrolStatus status;
    
    public static enum PatrolStatus {
    	CHECKED, NOT_CHECKED
    }
}
